﻿using Application.Contract.Dto;
using Domain.IRepository;

namespace Application
{
    /// <summary>
    ///  1、应用服务AppService
    ///  2、数据传输对象Dto
    ///  3、工作单元UnitOfWork 
    ///  
    /// 用户页面直接操作Service
    /// </summary>
    public class RroductAppService : IRroductAppService
    {
        /// <summary>
        /// 依赖领域仓储接口
        /// </summary>
        public IProductRepository productRepository { get; set; }

        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="inserProductDto"></param>
        public void InsertProduct(InserProductDto inserProductDto)
        {
            //1 转换  InserProductDto ->   product

            //2 添加商品
            productRepository.Insert(new Domain.Model.Product());

            productRepository.GetProDuctName(inserProductDto.ProductName);
        }
    }
}
